package com.ybkj.o2o.mc.manager.impl;

import com.ybkj.o2o.mc.entity.PassengerGradeAndArea;
import com.ybkj.o2o.mc.manager.PassengerGradeAndAreaManager;
import com.ybkj.o2o.mc.service.PassengerGradeAndAreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class DefaultPassengerGradeAndAreaManager implements PassengerGradeAndAreaManager {

  @Autowired
  private PassengerGradeAndAreaService passengerGradeAndAreaService;

  @Override
  public PassengerGradeAndArea insert(PassengerGradeAndArea passengerGradeAndArea) {

    passengerGradeAndArea.setCreated(new Date());
    passengerGradeAndArea.setUpdated(new Date());
    passengerGradeAndAreaService.insert(passengerGradeAndArea);

   return passengerGradeAndArea;
  }

  @Override
  public int updateByPrimaryKey(PassengerGradeAndArea passengerGradeAndArea) {

    return passengerGradeAndAreaService.update(passengerGradeAndArea);
  }

  @Override
  public int delete(Long id, String appKey) {

    return passengerGradeAndAreaService.delete(id,appKey);
  }

}
